function replaceCode2ulli() {
    var codes = document.getElementsByTagName("code");
    for (var i = 0; i < codes.length; i++) {



        codes[i].innerHTML = "<ul><li>" + codes[i].innerHTML.replace(/\n/g, "\n</li><li>") + "\n</li></ul>";


        sameWidth(codes[i]);



    }
}

function sameWidth(x) {
    var codesLi = x.getElementsByTagName("li");
    var maxWidth = 0;
    for (var li = 0;li<codesLi.length;li++) {
        maxWidth = Math.max(maxWidth, codesLi[li].scrollWidth);
    }

    for (var liWidth = 0; liWidth < codesLi.length; liWidth++) {
        codesLi[liWidth].style.width = maxWidth +"px";
    }
}